const express = require('express')
      router = express.Router()

// list页面渲染
router.get('/listaa',(req,res) => {
    var idlist = req.cookies.userId
    var datas = {}
    Answer.find({userId:idlist},function(err,data){
        console.log(data)
        datas = {ans:data}
//      console.log(datas)
    }).populate('askId')
    setTimeout(function(){
        Ask.find({userId:idlist},function(err,data){
            datas.ask = data
//             console.log(datas)
            res.render('listaa',datas)
        })
    }, 100);
})

module.exports = router